package cj.web.portal.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cj.web.kly.domain.Member;
import cj.web.portal.dao.MemberVoDAO;

@Service
@Transactional
public class LoginService {

	@Autowired
    private MemberVoDAO memberVoDAO;
	
	public Member queryByPhone(String phone){
		Member obj = memberVoDAO.queryByPhone(phone);
		return obj;
    }
	
	/**
	 * 查询
	 * @param id
	 * @return
	 */
	public Member queryById(int id){
		Member obj = memberVoDAO.queryById(id);
		return obj;
    }
	
	/**
	 * 错误记录
	 * @param id
	 */
	public void updateErrorById(int id){
		memberVoDAO.addErrorById(id);
	}
	
	/**
	 * 修改密码
	 * @param id
	 * @param pwd
	 */
	public void updatePwdForPortal(int id,String pwd){
		memberVoDAO.updatePwdForPortal(id, pwd);
	}
}